//
//  FJProfileModel.swift
//  FruitJuice
//
//  Created by Rui on 2023/12/16.
//

import Foundation

enum FJProfileModel: Equatable {
    case none
    case coins, post, friend, black, feedback, setting
    case terms, privacy, delete, clear, version
        
    var icon: String {
        switch self {
        case .coins:
            return "FJ_Profile_coin"
        case .post:
            return "FJ_Profile_post"
        case .friend:
            return "FJ_Profile_friends"
        case .black:
            return "FJ_Profile_black"
        case .feedback:
            return "FJ_Profile_feedback"
        case .setting:
            return "FJ_Profile_setting"
        default:
            return ""
        }
    }
    
    var title: String {
        switch self {
        case .coins:
            return "My Coins"
        case .post:
            return "My Post"
        case .friend:
            return "Friendslist"
        case .black:
            return "Blacklist"
        case .feedback:
            return "Feedback"
        case .setting:
            return "Settings"
        case .terms:
            return "Terms of use"
        case .privacy:
            return "Privacy policy"
        case .delete:
            return "Delete Account"
        case .clear:
            return "Clear cache"
        case .version:
            return "Version"
        default:
            return ""
        }
    }
    
    var isShowRightImageView: Bool{
        switch self {
        case .terms, .privacy, .delete:
            return true
        default:
            return false
        }
    }
    
    var content: String {
        switch self {
        case .version:
            let version = Bundle.main.infoDictionary?["CFBundleShortVersionString"] as? String
            return "V \(version ?? "")"
        case .clear:
            return String(format: "%.2fMB", FJGlobalTools.shared.queryCacheSize())
        default:
            return ""
        }
    }
}

struct FJReportItemModel {
    
    var title: String       = ""
    var select: Bool        = false
}
